package com.sunwayhorizo.health.hl7.persistent.pk;

import java.io.Serializable;

public class RimCoreEntyAddrPartsPK implements Serializable {
    public Long addressId;
    public Long addressPartId;
    public Long entityId;
    public Long entityVersionNum;

    public RimCoreEntyAddrPartsPK() {
    }

    public RimCoreEntyAddrPartsPK(Long addressId, Long addressPartId, Long entityId, Long entityVersionNum) {this.addressId = addressId;
        this.addressPartId = addressPartId;
        this.entityId = entityId;
        this.entityVersionNum = entityVersionNum;
    }

    public boolean equals(Object other) {
        if (other instanceof RimCoreEntyAddrPartsPK) {
            final RimCoreEntyAddrPartsPK otherEntyAddrPartsPK = (RimCoreEntyAddrPartsPK) other;
            final boolean areEqual = 
                (otherEntyAddrPartsPK.addressId.equals(addressId) && otherEntyAddrPartsPK.addressPartId.equals(addressPartId) && otherEntyAddrPartsPK.entityId.equals(entityId) && otherEntyAddrPartsPK.entityVersionNum.equals(entityVersionNum));
            return areEqual;
        }
        return false;
    }

    public int hashCode() {
        return super.hashCode();
    }
}
